/*
 * ConectionWindow.cpp
 *
 *  Created on: 04/06/2014
 *      Author: lucio
 */

#include "ConectionWindow.h"

void ConnectionWindow::ConnectButton_clicked(){
	std::string ip = this->IpEntry->get_text();
	std::string port = this->IpEntry->get_text();
	std::string userName = this->IpEntry->get_text();

	this->set_modal(false);
	this->glWindow->show_all();
}

ConnectionWindow::ConnectionWindow(BaseObjectType* object,
		const Glib::RefPtr<Gtk::Builder> &Builder):
			Gtk::Window(object), builder(Builder)
{
	builder->get_widget("IpEntry",this->IpEntry);
	builder->get_widget("PortEntry",this->PortEntry);
	builder->get_widget("UserNameEntry",this->UserNameEntry);
	builder->get_widget("ConnectButton",this->ConnectButton);

	builder->get_widget_derived("GameListWindow",this->glWindow);

	this->ConnectButton->signal_clicked().connect
				(sigc::mem_fun(*this, &ConnectionWindow::ConnectButton_clicked));
}

ConnectionWindow::~ConnectionWindow() {
	// TODO Auto-generated destructor stub
}

